﻿using System;
using System.IO;

namespace Character
{
	// Token: 0x020001AA RID: 426
	public class HairParameter : ParameterBase
	{
		// Token: 0x06000AFE RID: 2814 RVA: 0x0003F288 File Offset: 0x0003D488
		public HairParameter(SEX sex) : base(sex)
		{
			this.parts = new HairPartParameter[3];
			for (int i = 0; i < this.parts.Length; i++)
			{
				this.parts[i] = new HairPartParameter(sex);
			}
		}

		// Token: 0x06000AFF RID: 2815 RVA: 0x0003F2D0 File Offset: 0x0003D4D0
		public HairParameter(HairParameter copy) : base(copy.sex)
		{
			this.parts = new HairPartParameter[3];
			this.Copy(copy);
		}

		// Token: 0x06000B00 RID: 2816 RVA: 0x0003F2F4 File Offset: 0x0003D4F4
		public void Init()
		{
			for (int i = 0; i < this.parts.Length; i++)
			{
				this.parts[i].Init();
			}
		}

		// Token: 0x06000B01 RID: 2817 RVA: 0x0003F328 File Offset: 0x0003D528
		public void Copy(HairParameter copy)
		{
			if (this.parts == null)
			{
				this.parts = new HairPartParameter[3];
			}
			for (int i = 0; i < this.parts.Length; i++)
			{
				if (this.parts[i] == null)
				{
					this.parts[i] = new HairPartParameter(copy.parts[i]);
				}
				else
				{
					this.parts[i].Copy(copy.parts[i]);
				}
			}
		}

		// Token: 0x06000B02 RID: 2818 RVA: 0x0003F3A4 File Offset: 0x0003D5A4
		public void Save(BinaryWriter writer, SEX sex)
		{
			writer.Write(this.parts.Length);
			for (int i = 0; i < this.parts.Length; i++)
			{
				this.parts[i].Save(writer, sex);
			}
		}

		// Token: 0x06000B03 RID: 2819 RVA: 0x0003F3E8 File Offset: 0x0003D5E8
		public void Load(BinaryReader reader, SEX sex, CUSTOM_DATA_VERSION version)
		{
			int num = reader.ReadInt32();
			this.parts = new HairPartParameter[num];
			for (int i = 0; i < this.parts.Length; i++)
			{
				this.parts[i] = new HairPartParameter(sex);
				this.parts[i].Load(reader, sex, version);
			}
		}

		// Token: 0x04000B51 RID: 2897
		public HairPartParameter[] parts;
	}
}
